home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / plugin / nsIEventHandler.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  3KB  |  112 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIEventHandler.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIEventHandler_h__
  6. #define __gen_nsIEventHandler_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. #ifndef __gen_nspluginroot_h__
  14. #include "nspluginroot.h"
  15. #endif
  16.  
  17. /* For IDL files that don't want to include root IDL files. */
  18. #ifndef NS_NO_VTABLE
  19. #define NS_NO_VTABLE
  20. #endif
  21. #include "nsplugindefs.h"
  22.  
  23. /* starting interface:    nsIEventHandler */
  24. #define NS_IEVENTHANDLER_IID_STR "a447ddf0-1a99-11d2-815f-006008119d7a"
  25.  
  26. #define NS_IEVENTHANDLER_IID \
  27.   {0xa447ddf0, 0x1a99, 0x11d2, \
  28.     { 0x81, 0x5f, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a }}
  29.  
  30. class NS_NO_VTABLE nsIEventHandler : public nsISupports {
  31.  public: 
  32.  
  33.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IEVENTHANDLER_IID)
  34.  
  35.   /**
  36.    * Handles an event. An nsIEventHandler can also get registered with with
  37.    * nsIPluginManager2::RegisterWindow and will be called whenever an event
  38.    * comes in for that window.
  39.    *
  40.    * Note that for Unix and Mac the nsPluginEvent structure is different
  41.    * from the old NPEvent structure -- it's no longer the native event
  42.    * record, but is instead a struct. This was done for future extensibility,
  43.    * and so that the Mac could receive the window argument too. For Windows
  44.    * and OS2, it's always been a struct, so there's no change for them.
  45.    *
  46.    * (Corresponds to NPP_HandleEvent.)
  47.    *
  48.    * @param aEvent   - the event to be handled
  49.    * @param aHandled - set to PR_TRUE if event was handled
  50.    * @result         - NS_OK if this operation was successful
  51.    */
  52.   /* void handleEvent (in nsPluginEventPtr aEvent, out boolean aHandled); */
  53.   NS_IMETHOD HandleEvent(nsPluginEvent * aEvent, PRBool *aHandled) = 0;
  54.  
  55. };
  56.  
  57. /* Use this macro when declaring classes that implement this interface. */
  58. #define NS_DECL_NSIEVENTHANDLER \
  59.   NS_IMETHOD HandleEvent(nsPluginEvent * aEvent, PRBool *aHandled); 
  60.  
  61. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  62. #define NS_FORWARD_NSIEVENTHANDLER(_to) \
  63.   NS_IMETHOD HandleEvent(nsPluginEvent * aEvent, PRBool *aHandled) { return _to HandleEvent(aEvent, aHandled); } 
  64.  
  65. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  66. #define NS_FORWARD_SAFE_NSIEVENTHANDLER(_to) \
  67.   NS_IMETHOD HandleEvent(nsPluginEvent * aEvent, PRBool *aHandled) { return !_to ? NS_ERROR_NULL_POINTER : _to->HandleEvent(aEvent, aHandled); } 
  68.  
  69. #if 0
  70. /* Use the code below as a template for the implementation class for this interface. */
  71.  
  72. /* Header file */
  73. class nsEventHandler : public nsIEventHandler
  74. {
  75. public:
  76.   NS_DECL_ISUPPORTS
  77.   NS_DECL_NSIEVENTHANDLER
  78.  
  79.   nsEventHandler();
  80.  
  81. private:
  82.   ~nsEventHandler();
  83.  
  84. protected:
  85.   /* additional members */
  86. };
  87.  
  88. /* Implementation file */
  89. NS_IMPL_ISUPPORTS1(nsEventHandler, nsIEventHandler)
  90.  
  91. nsEventHandler::nsEventHandler()
  92. {
  93.   /* member initializers and constructor code */
  94. }
  95.  
  96. nsEventHandler::~nsEventHandler()
  97. {
  98.   /* destructor code */
  99. }
  100.  
  101. /* void handleEvent (in nsPluginEventPtr aEvent, out boolean aHandled); */
  102. NS_IMETHODIMP nsEventHandler::HandleEvent(nsPluginEvent * aEvent, PRBool *aHandled)
  103. {
  104.     return NS_ERROR_NOT_IMPLEMENTED;
  105. }
  106.  
  107. /* End of implementation class template. */
  108. #endif
  109.  
  110.  
  111. #endif /* __gen_nsIEventHandler_h__ */
  112.